<?php 
//用户表与信息表关联模型
namespace Admin\Model;
use Think\Model\RelationModel;
class WeiboRelationModel extends RelationModel{
	//定义主表名称
	Protected $tableName='weibo';
	//副表
	Protected $_link=array(
		'picture'=>array(
			'mapping_type'=>self::HAS_ONE,
			'foregin_key'=>'wid'
			),
		'keep'=>array(			
			'mapping_type'=>self::HAS_MANY,
			'foregin_key'=>'wid'
			),
		'comment'=>array(			
			'mapping_type'=>self::HAS_MANY,
			'foregin_key'=>'wid'
			),
		// 'atme'=>array(			
		// 	'mapping_type'=>self::HAS_MANY,
		// 	'foregin_key'=>'wid'
		// 	)
	);
}
?>